/*
* @Description:全局数据
*/
'use strict'

export default {
namespaced: true,
state: {

},
getters: {
},
actions: {
/**
* @description 设置state
* @param {Object} payload 参数名称 {String} state
* @param data {Object} 参数
* @param data.key {String} key
* @param data.value {String} value
*/
setData({state}, data) {
const keys = Object.keys(state)
let indexKey = data.key.split('.')[0]
if (!keys.includes(indexKey)) return console.error('不要输入不存在的值')
state[data.key]=data.value
},
},
}